import request from '@/utils/request'

export function list(data) {
  return request({
    url: '/purchase/order/listForReturn',
    method: 'post',
    data: data
  })
}
export function purchaseOrderList(data) {
  return request({
    url: '/purchase/order/list',
    method: 'post',
    data: data
  })
}
export function getInfo(data) {
  return request({
    url: '/purchase/order/' + data,
    method: 'get'
  })
}
export function remove(data) {
  return request({
    url: '/purchase/order/delete',
    method: 'post',
    data: { deleteIds: data }
  })
}
export function addOrUpdate(data) {
  return request({
    url: '/purchase/order/addOrEdit',
    method: 'post',
    data: data
  })
}
export function updateFile(data) {
  return request({
    url: '/purchase/order/updateFile',
    method: 'post',
    data: data
  })
}
export function supplierList(data) {
  return request({
    url: '/purchase/order/listPriceBySupplier',
    method: 'post',
    data: data
  })
}

export function orderList(data) {
  return request({
    url: '/purchase/requisition/allRequisitionDetailList',
    method: 'post',
    data: data
  })
}

export function orderDetailList(data) {
  return request({
    url: '/purchase/requisition/listForOrder',
    method: 'post',
    data: data
  })
}

export function detailedList(data) {
  return request({
    url: '/purchase/requisition/editRequisitionDetail',
    method: 'post',
    data: data
  })
}

export function orderGetInfo(data) {
  return request({
    url: '/purchase/requisition/listForOrder/' + data,
    method: 'get'
  })
}

export function requestList(data) {
  return request({
    url: '/purchase/requisition/allRequisitionDetailList',
    method: 'post',
    data: data
  })
}
export function getOrderInfo(data) {
  return request({
    url: '/purchase/order/getInfoForFinishOrderDetails/' + data,
    method: 'get'
  })
}
export function addOrOrderUpdate(data) {
  return request({
    url: '/purchase/order/finishOrderDetails',
    method: 'post',
    data: data
  })
}
